
/**
 * 构建“添加子菜单按钮”
 * 
 * @param treeId
 * @param treeNode
 * @param btnTitle
 * @param callback
 */
function buildAddHoverDom(treeId, treeNode, btnTitle, callback) {
	var addBtnId = 'addBtn_' + treeId + '_' + treeNode.tId;
	if (treeNode.editNameFlag || $("#" + addBtnId).length > 0) {
		return;
	}
	var addStr = "<span class='button add' id='" + addBtnId + "' title='"
			+ btnTitle + "' onfocus='this.blur();'></span>";
	var sObj = $("#" + treeNode.tId + "_span");
	sObj.after(addStr);
	var btn = $("#" + addBtnId);
	if (btn) {
		// $(selector).bind(event,data,function)
		var btndata = {
			'treeId' : treeId,
			'treeNode' : treeNode
		};
		btn.bind("click", btndata, callback);
	}
}

/**
 * 删除“添加子菜单按钮”
 * 
 * @param treeId
 * @param treeNode
 */
function removeHoverDom(treeId, treeNode) {
	var addBtnId = 'addBtn_' + treeId + '_' + treeNode.tId;
	$("#" + addBtnId).unbind().remove();
};

